From c72311d01a827a61d6d3d786416ddb442076d73a Mon Sep 17 00:00:00 2001
From: Sebastien Castiel <sebastien@castiel.me>
Date: Wed, 6 Dec 2023 12:39:54 -0500
Subject: Better loading behavior

---
 .../[groupId]/expenses/[expenseId]/edit/page.tsx   | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

(limited to 'src/app/groups/[groupId]/expenses/[expenseId]/edit/page.tsx')

diff --git a/src/app/groups/[groupId]/expenses/[expenseId]/edit/page.tsx b/src/app/groups/[groupId]/expenses/[expenseId]/edit/page.tsx
index f22ac08..934d346 100644
--- a/src/app/groups/[groupId]/expenses/[expenseId]/edit/page.tsx
+++ b/src/app/groups/[groupId]/expenses/[expenseId]/edit/page.tsx
@@ -1,9 +1,6 @@
 import { ExpenseForm } from '@/components/expense-form'
-import { Button } from '@/components/ui/button'
 import { getExpense, getGroup, updateExpense } from '@/lib/api'
 import { expenseFormSchema } from '@/lib/schemas'
-import { ChevronLeft } from 'lucide-react'
-import Link from 'next/link'
 import { notFound, redirect } from 'next/navigation'
 
 export default async function EditExpensePage({
@@ -24,19 +21,10 @@ export default async function EditExpensePage({
   }
 
   return (
-    <main>
-      <div className="mb-4">
-        <Button variant="ghost" asChild>
-          <Link href={`/groups/${groupId}`}>
-            <ChevronLeft className="w-4 h-4 mr-2" /> Back to group
-          </Link>
-        </Button>
-      </div>
-      <ExpenseForm
-        group={group}
-        expense={expense}
-        onSubmit={updateExpenseAction}
-      />
-    </main>
+    <ExpenseForm
+      group={group}
+      expense={expense}
+      onSubmit={updateExpenseAction}
+    />
   )
 }
-- 
cgit v1.3

